package com.heima.apis.admin;

import com.heima.model.admin.dtos.ChannelDto;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author HYK
 * @date 2022/10/22
 */
@FeignClient(value = "leadnews-wemedia")
public interface IAdminClient {
    /**
     * 查询敏感词列表
     *
     * @param dto dto
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/sensitive/list")
    ResponseResult list(@RequestBody SensitiveDto dto);

    /**
     * 新增敏感词
     *
     * @param wmSensitive wm敏感
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/sensitive/save")
    ResponseResult saveSensitive(@RequestBody WmSensitive wmSensitive);

    /**
     * 修改敏感词
     *
     * @param wmSensitive wm敏感
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/sensitive/update")
    ResponseResult updateSensitive(@RequestBody WmSensitive wmSensitive);

    /**
     * 删除敏感词
     *
     * @param id id
     * @return {@link ResponseResult}
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    ResponseResult deleteSensitive(@PathVariable("id") Integer id);

    /**
     * 查询频道列表
     *
     * @param dto dto
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/channel/list")
    ResponseResult list(@RequestBody ChannelDto dto);

    /**
     * 新增频道
     *
     * @param wmChannel wm通道
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/channel/save")
    ResponseResult saveChannel(@RequestBody WmChannel wmChannel);

    /**
     * 修改频道
     *
     * @param wmChannel wm通道
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/channel/update")
    ResponseResult updateChannel(@RequestBody WmChannel wmChannel);

    /**
     * 删除频道
     *
     * @param id id
     * @return {@link ResponseResult}
     */
    @GetMapping("/api/v1/channel/del/{id}")
    ResponseResult deleteChannel(@PathVariable("id") Integer id);

    /**
     * 自媒体文章人工审核
     *
     * @param dto dto
     * @return {@link ResponseResult}
     */
    @PostMapping("/api/v1/news/list_vo")
    ResponseResult listVo(@RequestBody NewsAuthDto dto);

}
